from django.db import models

# Create your models here.
class EmbeddingType(models.Model):
    name = models.CharField(max_length=64, unique=True, verbose_name='模型名称')
    dim = models.CharField(max_length=32, verbose_name='向量维度')
    url = models.CharField(max_length=128, blank=True, null=True, verbose_name='向量维度')
    description = models.CharField(max_length=256, verbose_name='模型描述', blank=True, null=True)
    status = models.BooleanField(choices=((1, '有效'), (0, '无效')), verbose_name='状态', default=1)
    comment = models.CharField(max_length=256, verbose_name='备注', blank=True, null=True)
    create_time = models.DateTimeField(auto_now_add=True, null=False, blank=False, verbose_name='创建时间')
    update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间')

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = "嵌入向量模型"
        verbose_name_plural = verbose_name